package com.yingsheng.bi.hks.feign.client;

import com.yingsheng.bi.hks.basic.FeignConst;
import com.yingsheng.bi.hks.dto.goods.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 商品管理路由
 */
@FeignClient(contextId = FeignConst.HKS_GOODS, name = FeignConst.SERVICE_NAME)
@Api(tags = "商品管理", value = "商品管理")
public interface GoodsFeignClient {

    @ApiOperation(httpMethod = "POST", value = "商品新增")
    @RequestMapping(value = "/goodsMgmt/goodsAdd")
    GoodsAddRes add(@RequestBody GoodsAddReq req);

    @ApiOperation(httpMethod = "POST", value = "商品规格新增")
    @RequestMapping(value = "/goodsMgmt/goodsSpecAdd")
    GoodsSpecAddRes goodsSpecAdd(@RequestBody GoodsSpecAddReq req);

    @ApiOperation(httpMethod = "POST", value = "商品规格查询")
    @RequestMapping(value = "/goodsMgmt/goodsSpecQry")
    GoodsSpecQryRes goodsSpecQry(@RequestBody GoodsSpecQryReq req);

    @ApiOperation(httpMethod = "POST", value = "商品查询")
    @RequestMapping(value = "/goodsMgmt/goodsQry")
    GoodsQryRes goodsQry(@RequestBody GoodsQryReq req);

    @ApiOperation(httpMethod = "POST", value = "商品详情查询")
    @RequestMapping(value = "/goodsMgmt/goodsDetailQry")
    GoodsDetailQryRes goodsDetailQry(@RequestBody GoodsDetailQryReq req);

    @ApiOperation(value = "商品购买")
    @PostMapping(value = "/goodsMgmt/goodsBuy")
    GoodsBuyRes goodsOrderQry(@RequestBody GoodsBuyReq req);

    @ApiOperation(value = "用户订单查询")
    @PostMapping(value = "/goodsOrder/goodsOrderQry")
    GoodsOrderQryRes goodsOrderQry(@RequestBody GoodsOrderQryReq req);
}
